﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Model;
using LibDll;
using AJNetLib;
using VehicleHelper;

namespace AJNetDll
{
    public class NetImplement
    {
        public ReturnInfo<Dictionary<string, string>> QueryVehicleInfo(string strHPHM, string strHPZLDH)
        {
            ReturnInfo<Dictionary<string, string>> ret = new ReturnInfo<Dictionary<string, string>>();

            QueryCondition queryCon = new QueryCondition();
            queryCon.DicQueryPara = new Dictionary<string, string>();

            LoginVehicleBase loginBase = new LoginVehicleBase(strHPHM, strHPZLDH);
            NetInfoBase netInfoBase = new NetInfoBase();

            queryCon.DicQueryPara.Add("clsbdh", loginBase.Login_Info.VIN);
            queryCon.DicQueryPara.Add("hphm", strHPHM);
            queryCon.DicQueryPara.Add("hpzl", strHPZLDH);
            queryCon.DicQueryPara.Add("jkid", "18C49");
            queryCon.DicQueryPara.Add("jkxlh", netInfoBase.jkxlh);
            queryCon.DicQueryPara.Add("jyjgbh", netInfoBase.jyjgbh);
            queryCon.DicQueryPara.Add("xtlb", netInfoBase.xtlb);
            queryCon.DicQueryPara.Add("sqip", netInfoBase.zdbs);

            QueryVehicle queryVehicle = new QueryVehicle();
            ret = queryVehicle.QueryByJKId(queryCon);

            return ret;
        }

        public ReturnInfo<Dictionary<string, string>> QueryVehicleJCLSH(string strHPHM, string strHPZLDH)
        {
            ReturnInfo<Dictionary<string, string>> ret = new ReturnInfo<Dictionary<string, string>>();
            QueryCondition queryCon = new QueryCondition();
            queryCon.DicQueryPara = new Dictionary<string, string>();

            LoginVehicleBase loginBase = new LoginVehicleBase(strHPHM, strHPZLDH);
            NetInfoBase netInfoBase = new NetInfoBase();

            queryCon.DicQueryPara.Add("clsbdh", loginBase.Login_Info.VIN);
            queryCon.DicQueryPara.Add("hphm", strHPHM);
            queryCon.DicQueryPara.Add("hpzl", strHPZLDH);
            queryCon.DicQueryPara.Add("jkid", "18M11");
            queryCon.DicQueryPara.Add("jkxlh", netInfoBase.jkxlh);
            queryCon.DicQueryPara.Add("jyjgbh", netInfoBase.jyjgbh);
            queryCon.DicQueryPara.Add("xtlb", netInfoBase.xtlb);
            queryCon.DicQueryPara.Add("sqip", netInfoBase.zdbs);

            QueryVehicle queryVehicle = new QueryVehicle();
            ret = queryVehicle.QueryByJKId(queryCon);

            return ret;
        }
    }
}
